package com.ws.lv.service.impl;

import com.ws.lv.bean.Save;
import com.ws.lv.mapper.SaveMapper;
import com.ws.lv.service.SaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SaveServiceImpl implements SaveService {
    @Autowired
    SaveMapper saveMapper;
    @Override
    public List<Save> selectSaves(String user_name, String route_name) {
        return saveMapper.selectSaves(user_name,route_name);
    }

    @Override
    public Save selectSaveByUserIdAndRouteId(int save_userId, int save_routeId) {
        return saveMapper.selectSaveByUserIdAndRouteId(save_userId,save_routeId);
    }

    @Override
    public int insertSave(Save save) {
        return saveMapper.insertSave(save);
    }

    @Override
    public int deleteSaveById(int saveId) {
        return saveMapper.deleteSaveById(saveId);
    }

    @Override
    public List<Save> selectSavesByUserId(int user_id) {
        return saveMapper.selectSavesByUserId(user_id);
    }

    @Override
    public int deleteSaveByUserId(int user_id) {
        return saveMapper.deleteSaveByUserId(user_id);
    }

    @Override
    public int deleteSaveByRouteId(int route_id) {
        return saveMapper.deleteSaveByRouteId(route_id);
    }

}
